package com.johnsoft.pph.gui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JFrame;
import javax.swing.JTextArea;

public class GuiWelcome extends IGui {
	
	JTextArea welcomeField = new JTextArea();
	GWNextButton nextButton = new GWNextButton();
	
	public GuiWelcome()
	{
		 welcomeField.setText(
				 "This Setup will Install the Pre-PreHistoric Mod into your minecraft." + "\r\n"
				 + "\r\n" 
				 + "The Setup will check and download requiered data for the mod." + "\r\n"
				 + "It will also check for correct minecraft version(s)" + "\r\n"
				 + "If your installing the server-side part: \r\nPlace the minecraft_server.jar in the same spot as this file"
				 );
	}
	
	JFrame installFrame(JFrame frame)
	{
		GridBagConstraints c = new GridBagConstraints();
		c.weightx = 1;
		c.gridx = 0;
		c.gridy = 0;
		c.insets = new Insets(150, 0, 0, 0);
		c.anchor = GridBagConstraints.SOUTH;
		frame.add(welcomeField, c);
		 
		c = new GridBagConstraints();
		c.gridy = 1;
		c.gridx = 0;
		c.anchor = GridBagConstraints.SOUTH;
		frame.add(nextButton, c);
		 
		return frame;
	}

	@Override
	JFrame uninstallFrame(JFrame frame) {
		frame.remove(welcomeField);
		frame.remove(nextButton);
		return frame;
	}
}
